package com.cc.springboot.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.cc.springboot.entity.UserEntity;

public interface UserMapper {
	@Select("SELECT * FROM USERS WHERE USERNAME = #{name}")
	UserEntity findByName(@Param("name") String name);
	
	@Insert("INSERT INTO USERS(ID, USERNAME) VALUES(#{id}, #{name})")
	int insert(@Param("id") Integer id, @Param("name") String name);
}
